package com.esunrise.shop.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.esunrise.shop.common.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    List<SysUser> findLimit(int preNum,int sufNum);

    int userCount();

    List<SysUser> findAll();


    int insertOld(@Param("username") String username, @Param("password") String password,
                  @Param("email") String email, @Param("mark") int mark);

    SysUser selectByEmail(String email);

    SysUser getUserInfo(String email);

    int updateMark(int mark,String email);

    int updateOld(String username, String password, String email);

    int updateByIdOld(String username, String password, String header, String email, int id);
}
